package com.bawei.detail.adapter

import androidx.recyclerview.widget.DiffUtil
import com.bawei.common.entity.MovieVideoEntity

/**
 * Author: Jason Zhang
 * Date: 2024/3/9
 * Desc:
 */
class DetailEntityComparator : DiffUtil.ItemCallback<MovieVideoEntity>() {

    override fun areItemsTheSame(oldItem: MovieVideoEntity, newItem: MovieVideoEntity): Boolean {
        return oldItem.id == newItem.id
    }

    override fun areContentsTheSame(oldItem: MovieVideoEntity, newItem: MovieVideoEntity): Boolean {
        return oldItem == newItem
    }


}